#pragma once

#include "..\SGD Wrappers\SGD_Math.h"
#include "Tool.h"

class Player;
class CSGD_TextureManager;

enum facing { FACINGLEFT, FACINGRIGHT };
enum VerticalHeading{ LOOKINGSTRAIGHT, LOOKINGUP, LOOKINGDOWN };

class Arm
{
	int ImageID;
	Player* player;
	int drawOffsetX;
	int	drawOffsetY;
	int toolOffsetX;
	int toolOffsetY;
	CSGD_TextureManager* tM;
	float ArmPosX;
	float ArmPosY;
	int differenceX;
	int differenceY;
	int revPosX;
	int distancefromhitbox;
	tVector2D toolpoint;
	bool isRear;
	bool isFrozen;

	ToolType myTool;
	Tool* pTool;
	facing direction;
	VerticalHeading looking;

public:
	Arm(Player* owner, bool isItTheRearArm );
	~Arm(void);

	void Update( float deltaTime );
	void Render( void );

	void SetFrozen( bool freeze ) { isFrozen = freeze; }
	bool GetFrozen( void ) const { return isFrozen; }

	int GetToolPointX( void );
	int GetToolPointY( void );

	bool GetIsRear( void ) const { return isRear; }

	void SetTool( ToolType tooltype, Tool* tool ) { myTool = tooltype; pTool = tool;  }

	void SetFacing( facing dir ) { direction = dir; }
	void SetVerticalHeading( VerticalHeading look ) { looking = look; }
};

